import express from 'express'
import { success } from '../../utils/responses'
import { SignInSchema } from './auth.validation'
import authService from './auth.services'

const router = express.Router()

router.post('/signIn', async (req, res) => {
  const signInParam = SignInSchema.parse(req.body)
  const token = await authService.signIn(signInParam)
  success(res, '登陆成功', token)
})
export default router
